{extend name="property@base"/}
{block name='content'}
	
	<div class="weui-search-bar" id="searchBar" >
	  <form class="weui-search-bar__form" id='searchForm' action="{:url('record_list/index')}">
	    <div class="weui-search-bar__box">
	      <i class="weui-icon-search"></i>
	      <input type="search" class="weui-search-bar__input" name='date' value="{$date}" id="searchInput" placeholder="请选择日期" required="">
	      <a href="javascript:" class="weui-icon-clear" id="searchClear"></a>
	    </div>
	    <label class="weui-search-bar__label" id="searchText">
	      <i class="weui-icon-search"></i>
	      <span>请选择日期</span>
	    </label>
	  </form>
	  <a href="javascript:" class="weui-search-bar__cancel-btn" id="searchCancel">取消</a>
	</div>
	<!-- 派工单列表开始 -->
	{if condition="!empty($workrecords)"}
	<header class="demos-header">
      <h1 class="demos-title">派工单列表</h1>
    </header>
    {/if}
	{volist name='workrecords' id='record'}
	<div class="weui-form-preview">
	  <div class="weui-form-preview__bd">
	    <div class="weui-form-preview__item">
	      <label class="weui-form-preview__label">类型</label>
	      <span class="weui-form-preview__value">派工单</span>
	    </div>
	    <div class="weui-form-preview__item">
	      <label class="weui-form-preview__label">工作日期</label>
	      <span class="weui-form-preview__value">{$record.date}</span>
	    </div>
	    <div class="weui-form-preview__item">
	      <label class="weui-form-preview__label">工作时段</label>
	      <span class="weui-form-preview__value">{$record.starttime} - {$record.endtime}</span>
	    </div>
	    <div class="weui-form-preview__item">
	      <label class="weui-form-preview__label">工作用时</label>
	      <span class="weui-form-preview__value">{$record.worktime|round=###,2}</span>
	    </div>
	    <div class="weui-form-preview__item">
	      <label class="weui-form-preview__label">派工内容</label>
	      <span class="weui-form-preview__value">{$record.content}</span>
	    </div>
	    <div class="weui-form-preview__item">
	      <label class="weui-form-preview__label">效率系数</label>
	      <span class="weui-form-preview__value">{$record.efficiency|round=###,2}</span>
	    </div>
	    <div class="weui-form-preview__item">
	      <label class="weui-form-preview__label">难度系数</label>
	      <span class="weui-form-preview__value">{$record.coefficient|round=###,2}</span>
	    </div>
	    <div class="weui-form-preview__item">
	      <label class="weui-form-preview__label">环境系数</label>
	      <span class="weui-form-preview__value">{$record.environmental|round=###,2}</span>
	    </div>
	    <div class="weui-form-preview__item">
	      <label class="weui-form-preview__label">备注</label>
	      <span class="weui-form-preview__value">{$record.remark}</span>
	    </div>
	  </div>
	  <div class="weui-form-preview__ft">
	    <a class="weui-form-preview__btn weui-form-preview__btn_primary" href="{:url('record_list/edit_order',['id'=>$record.id,'type'=>'work'])}">编辑</a>
	    <a class="weui-form-preview__btn weui-form-preview__btn_warn ajax_del" href="{:url('record_list/del_work',['id'=>$record.id])}">删除</a>
	  </div>
    </div>
    <br/>
	{/volist}
	{if condition="empty($workrecords)"}
		<div class="weui-loadmore weui-loadmore_line">
		  <span class="weui-loadmore__tips">暂无{$date}派工单数据</span>
		</div>
	{/if}
	<!-- 派工单列表结束 -->
	<hr/>
	<br/>
	{if condition="!empty($restrecords)"}
	<header class="demos-header">
      <h1 class="demos-title">待工单列表</h1>
    </header>
    {/if}
	{volist name='restrecords' id='record'}
	<div class="weui-form-preview">
	  <div class="weui-form-preview__bd">
	    <div class="weui-form-preview__item">
	      <label class="weui-form-preview__label">类型</label>
	      <span class="weui-form-preview__value">待工单</span>
	    </div>
	    <div class="weui-form-preview__item">
	      <label class="weui-form-preview__label">待工日期</label>
	      <span class="weui-form-preview__value">{$record.date}</span>
	    </div>
	    <div class="weui-form-preview__item">
	      <label class="weui-form-preview__label">待工时段</label>
	      <span class="weui-form-preview__value">{$record.starttime} - {$record.endtime}</span>
	    </div>
	    <div class="weui-form-preview__item">
	      <label class="weui-form-preview__label">待工用时</label>
	      <span class="weui-form-preview__value">{$record.resttime|round=###,2}</span>
	    </div>
	    <div class="weui-form-preview__item">
	      <label class="weui-form-preview__label">待工事由</label>
	      <span class="weui-form-preview__value">{$record.remark}</span>
	    </div>
	    <div class="weui-form-preview__item">
	      <label class="weui-form-preview__label">待工系数</label>
	      <span class="weui-form-preview__value">{$record.efficiency|round=###,2}</span>
	    </div>
	  </div>
	  <div class="weui-form-preview__ft">
	    <a class="weui-form-preview__btn weui-form-preview__btn_primary" href="{:url('record_list/edit_order',['id'=>$record.id,'type'=>'rest'])}">编辑</a>
	    <a class="weui-form-preview__btn weui-form-preview__btn_warn ajax_del" href="{:url('record_list/del_rest',['id'=>$record.id])}">删除</a>
	  </div>
	</div>
	{/volist}
	{if condition="empty($restrecords)"}
		<div class="weui-loadmore weui-loadmore_line">
		  <span class="weui-loadmore__tips">暂无{$date}待工单数据</span>
		</div>
	{/if}
	<br/>
{/block}
{block name='script'}
	<script type='text/javascript'>
	$(function(){
		$("#searchInput").calendar();
		$("#searchInput").change(function(){
			if($(this).val()!="{$date}"&&$(this).val()!=""){
				$("#searchForm").submit();
			}
		});
	});
		
	</script>
{/block}